<include file="Public:header2"/>
<div class="main">
    <div class="box_m">

        <include file="Public:pro_left2"/>

        <div class="main_r">
            <div class="main_r_t">
                {$cp_info.sort_name} > {$cp_info.title}
                <span style="text-align: right;float: right;display: inline-block;">{$cp_info.ctime|date='Y-m-d',###}</span>
            </div>
            <div class="detail_box">
                <div class="detail_l">
                	
                    <div class="main_big" >
                        <div class="main_big_up" style="height: 650px;">
                            <video src="{$cp_info.url}" alt="{$cp_info.title}" id="big_img" controls="controls"></video>
                        </div>
                        
                        
                    </div>
                    
                </div>
                <div class="detail_r">
                    <ul>
                        <li>相关视频</li>
                    </ul>
                    <div style="width:100%;height:615px;overflow: auto;">
                		<volist name="cps" id="l">
                			<a class="cp_list_a" href="{:U('Index/pro_content',array(cp_id=>$l['id']))}" title="{$l.title}">
	                            <div style="width:100%;height:100px;padding:11px 0;border-bottom: 1px solid #ddd;">
	                            	<div style="width:120px;height:100px;float: left;background: #eee;">
	                        			<video src="{$l.url}" alt="{$l.title}" style="width:100%;height: 100%;;">
	                        		</div>
	                        		<div style="width:130px;height:100px;float: right;">
	                        			<div style="width:100%;height:72px;line-height: 24px;overflow: hidden;">
	                        				{$l.title}
	                        			</div>
	                        			<div style="width:100%;height:28px;line-height: 28px;overflow: hidden;">
	                        				{$l.ctime|date='Y-m-d',###}
	                        			</div>
	                        		</div>
	                        		<div class="clear"></div>
	                            </div>
                            </a>
                        </volist>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="main_r_pics" style="color: #666;background: #eee;height: 40px;line-height: 40px;margin-top:5px;margin-bottom: 10px;">
            	<php>
            		if($cp_zan['uid']<=0){
            	</php>
	            	<div style="float: left;padding-left:10px;cursor: pointer;" class="zan_div" onclick="do_zan({$cp_info.id})">
	            		<img style="width:24px;vertical-align: middle;height: 22px;;" class="zan_div_img" src="./Public/Share/pic/zanzan.png">
	            		<span style="font-size:14px;color: #666;" class="zan_div_span">{$cp_info.zan}</span>
	            	</div>
            	<php>
            		}else{
            	</php>
            		<div style="float: left;padding-left:10px;cursor: pointer;" class="zan_div" onclick="do_zan({$cp_info.id})">
	            		<img style="width:24px;vertical-align: middle;height: 22px;;" class="zan_div_img" src="./Public/Share/pic/zanzan-hover.png">
	            		<span style="font-size:14px;color: #d4237a;" class="zan_div_span">{$cp_info.zan}</span>
	            	</div>
            	<php>
            		}
            	</php>
            	<php>
            		if($cp_shoucang['uid']<=0){
            	</php>
	            	<div style="float: left;margin-left:40px;cursor: pointer;" class="sc_div" onclick="do_shoucang({$cp_info.id})">
	            		<img style="width:24px;vertical-align: middle;height: 22px;;" class="sc_div_img" src="./Public/Share/pic/zan.png">
	            		<span style="font-size:14px;color: #666;" class="sc_div_span">{$cp_info.shoucang}</span>
	            	</div>
            	<php>
            		}else{
            	</php>
            		<div style="float: left;margin-left:40px;cursor: pointer;" class="sc_div" onclick="do_shoucang({$cp_info.id})">
	            		<img style="width:24px;vertical-align: middle;height: 22px;;" class="sc_div_img" src="./Public/Share/pic/zan-hover.png">
	            		<span style="font-size:14px;color: #d4237a;" class="sc_div_span">{$cp_info.shoucang}</span>
	            	</div>
            	<php>
            		}
            	</php>
            	
            	<div style="float: right;">
            		<div style="float: left;">
            			分享到：
            		</div>
            		<div style="float: left;padding-top:6px;">
            			<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_mshare" data-cmd="mshare" title="分享到一键分享"></a><a href="#" class="bds_evernotecn" data-cmd="evernotecn" title="分享到印象笔记"></a><a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a><a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a></div>
            		</div>
            		<div class="clear"></div>
            	</div>
                <div class="clear"></div>
            </div>

            <div class="main_r_pics" style="font-size:18px;color: #333;padding-bottom: 5px;border-bottom: 1px solid #ccc;">
			内容摘要
            </div>
            <div class="main_r_pics" style="color: #666;padding-top: 5px;">
                {$cp_info.intro}
            </div>
            <div class="main_r_pics" style="font-size:18px;color: #333;padding-top:20px;padding-bottom: 5px;border-bottom: 1px solid #ccc;">
			评论
            </div>
            <div  style="color: #666;padding-top: 5px;">
                <div style="width:100%;height: auto;">
                	<textarea style="width:100%;height:60px;" class="fb_text"></textarea>
                </div>
                <div style="width:100%;height: auto;padding-top:5px;">
                	<a href="javascript:;" class="fb_btn" onclick="do_pl({$cp_info.id})">发表</a>
                </div>
            </div>
            <div class="pl_list" >
            	<volist name="cp_pl" id="l">
	            	<div class="pl_list_li" >
	                	<div class="pl_list_li_title">
	                		<div class="pl_list_li_title_user">
	                			{$l.user.name}
	                		</div>
	                		<div class="pl_list_li_title_time">
	                			{$l.ctime|date='Y-m-d H:i:s',###}
	                		</div>
	                		<div class="clear"></div>
	                	</div>
	                	<div class="pl_list_li_content">
	                		{$l.content}
	                	</div>
	                </div>
                </volist>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<script type="text/javascript">
	function do_zan(t){
		$.post("{:U('index/do_zan')}",{'cp_id':t },function(v) {
			if (v.err_code == 0) {
				if(v.add==1){
					$(".zan_div_img").attr("src","./Public/Share/pic/zanzan-hover.png");
					$(".zan_div_span").text(v.num);
					$(".zan_div_span").css("color","#d4237a");
				}else{
					$(".zan_div_img").attr("src","./Public/Share/pic/zanzan.png");
					$(".zan_div_span").text(v.num);
					$(".zan_div_span").css("color","#666");
				}
				
			}else if(v.err_code == 1){
				alert("请登录");
				window.location.href="{:U('Index/login')}";
			}else{
				alert("点赞失败");
			}
			

		},'json');
	}
	function do_shoucang(t){
		$.post("{:U('index/do_shoucang')}",{'cp_id':t },function(v) {
			if (v.err_code == 0) {
				if(v.add==1){
					$(".sc_div_img").attr("src","./Public/Share/pic/zan-hover.png");
					$(".sc_div_span").text(v.num);
					$(".sc_div_span").css("color","#d4237a");
				}else{
					$(".sc_div_img").attr("src","./Public/Share/pic/zan.png");
					$(".sc_div_span").text(v.num);
					$(".sc_div_span").css("color","#666");
				}
				
			}else if(v.err_code == 1){
				alert("请登录");
				window.location.href="{:U('Index/login')}";
			}else{
				alert("点赞失败");
			}
			

		},'json');
	}
	function do_pl(t){
		var fb_text=$(".fb_text").val();
		$.post("{:U('index/do_pl')}",{'cp_id':t,'content':fb_text },function(v) {
			if (v.err_code == 0) {
				$(".pl_list").append("<div class='pl_list_li' ><div class='pl_list_li_title'><div class='pl_list_li_title_user'>"+v.user.name+"</div><div class='pl_list_li_title_time'>"+v.pl.ctime_date+"</div><div class='clear'></div></div><div class='pl_list_li_content'>"+v.pl.content+"</div></div>");
				
			}else if(v.err_code == 1){
				alert("请登录");
				window.location.href="{:U('Index/login')}";
			}else{
				alert("评论失败");
			}
			

		},'json');
	}
</script>


<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

<include file="Public:bottom"/>